// 获取components文件夹下文件路径名称
const requireComponent = require.context('@/components', true, /\.vue$/)
const componentNames = []

requireComponent.keys().forEach((filePath) => {
  const componentPath = filePath.replace(/^\.\//, '').replace(/\.\w+$/, '')
  const [folderName, fileName] = componentPath.split('/')
  const componentName = `${folderName}/${fileName}`
  componentNames.push(componentName)
})

export default componentNames
